package com.ziyun.erp.modules.productBaseInfo.dao;

import com.ziyun.erp.modules.goods.dto.OptionDto;
import com.ziyun.erp.modules.productBaseInfo.entity.ProductBaseInfoEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ziyun.erp.modules.quoteAttribute.entity.QuoteAttributeOptionEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 产品基础信息关系表
 * 
 * @author jl
 * @email 
 * @date 2018-09-14 09:46:47
 */
public interface ProductBaseInfoDao extends BaseMapper<ProductBaseInfoEntity> {

    List<OptionDto> selectEditSelectOptionIds(@Param("goodsId") Long goodsId, @Param("attributeId") Integer attributeId, @Param("partId") Integer partId);

    List<OptionDto> selectEditSelectOptionIdsTwo(@Param("goodsId")Long goodsId, @Param("attributeId")Integer attributeId);

//    List<QuoteAttributeOptionEntity> selectEditSelectOptionIdsTwo(@Param("goodsId")Long goodsId, @Param("attributeId")Integer attributeId);

    List<Map<String,Object>> selectEditHasPriceMaterialOption(@Param("goodsId") Long goodsId, @Param("partId")Integer partId, @Param("attributeId")int i, @Param("optionKey")String optionKey);

    List<Map<String,Object>> selectEditHasPriceMaterialOptionTwo(@Param("goodsId")Long goodsId, @Param("attributeId")int i, @Param("optionKey")String optionKey);

    void delFlagQuoteProductByGoodsId(@Param("goodsId") Long goodsId);

    Integer getEditSelectDefaultOptionId(@Param("goodsId") Long goodsId,@Param("attributeId") Integer attributeId,@Param("partId") Integer partId);


    Integer getEditSelectDefaultOptionIdTwo(@Param("goodsId")Long goodsId,@Param("attributeId") Integer attributeId);

    ProductBaseInfoEntity getEditSelectDefaultMaterialOption(@Param("goodsId") Long goodsId);

    ProductBaseInfoEntity getEditSelectDefaultMaterialOptionTwo(@Param("goodsId")Long goodsId,@Param("partId") Integer partId);

    void deleteProductBaseInfoByGoodsId(@Param("goodsId") Long goodsId);

    void solveEditCraft(@Param("goodsId") Long goodsId,@Param("craftOptionIds") String craftOptionIds);

    List<Integer> selectTwbOptionIds(@Param("goodsId") Long goodsId);
}
